package com.example.qihuibao.dao

import androidx.room.*
import com.example.qihuibao.bean.*

@Dao
interface DealDao {
//    @Query("SELECT * FROM Deal WHERE phone IN (:field_phone)")
//    fun queryInPhone(field_phone: String): List<UserInfo>?
//
    @Insert(onConflict = OnConflictStrategy.REPLACE)
    fun save(bean: RspUseConsumeBean.Deal) : Long
//
////    @Insert
//    @Insert(onConflict = OnConflictStrategy.REPLACE)
//    fun saveList(users: List<UserInfo>) : List<Long>?
//
    @Query("SELECT * FROM Deal")
    fun queryAll(): List<RspUseConsumeBean.Deal>?
//
//    @Delete
//    fun delete(userInfo: UserInfo)
//
    @Query("DELETE FROM Deal")
    fun deleteAll()
}